home *** CD-ROM | disk | FTP | other *** search
Wrap
/* $VER: 1.0, ©1996 Dietmar Eilert. Create empty list */ OPTIONS RESULTS /* enable return codes */ arg TYPE if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */ address 'GOLDED.1' 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */ if (RC ~= 0) then exit OPTIONS FAILAT 6 /* ignore warnings */ SIGNAL ON SYNTAX /* ensure clean exit */ /* ------------------------ INSERT YOUR CODE HERE: ------------------- */ 'FIND FIRST QUIET STRING="<BODY"' if (RC = 0) then do 'QUERY LINE VAR=BODYLINE' if (TYPE = 1) then do TAG = "TEXT=#" TITLE = "Text color:" DEFAULT = "#000000" end if (TYPE = 2) then do TAG = "LINK=#" TITLE = "Color of new links:" DEFAULT = "#0000CC" end if (TYPE = 3) then do TAG = "BGCOLOR=#" TITLE = "Background color:" DEFAULT = "#AAAAAA" end if (TYPE = 4) then do TAG = "VLINK=#" TITLE = "Color of visited links:" DEFAULT = "#000077" end if (TYPE = 5) then do TAG = "ALINK=#" TITLE = "Color of active link:" DEFAULT = "#CC0000" end 'FIND NEXT QUIET STRING=" ' || TAG || '"' if (RC = 0) then do 'QUERY LINE' if (RESULT = BODYLINE) then do REPLACE = 1 'FIND NEXT STRING="#"' 'QUERY BUFFER VAR=BUFFER' 'QUERY COLUMN VAR=COLUMN' DEFAULT = substr(BUFFER, COLUMN, 7) end else do 'FIND FIRST QUIET STRING="<BODY"' REPLACE = 0 end end else REPLACE = 0 'W3COLOR ASK OLD="' || DEFAULT || '" TITLE="' || TITLE || '"' if (RC = 0) then do COLOR = RESULT if (substr(COLOR, 1, 1) = "#") then COLOR = SUBSTR(COLOR, 2) if (REPLACE = 1) then do 'QUERY INSERT VAR=INSERT' 'SET INSERT FALSE' 'RIGHT' 'TEXT T="' || COLOR || '"' 'SET INSERT ' || INSERT end else do 'GOTO STEP 5' 'TEXT T=" ' || TAG || COLOR || '"' end end end else do 'REQUEST BODY="Body tag not found - can not add color|information.||Please create a HTML frame first. Run the|Document Wizard if you need assistance." BUTTON="!WIZARD|_Cancel"' if (RESULT=1) then do 'UNLOCK' address 'AREXX' 'golded:tools/www/arexx/document.ged' exit end end /* ---------------------------- END OF YOUR CODE --------------------- */ 'UNLOCK' /* VERY important: unlock GUI */ exit SYNTAX: SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-(" 'UNLOCK' exit